<template>
    <div class="loading" v-show="prop.show">
        <div>{{prop.msg}}</div>
    </div>
</template>

<script>
export default {
    props: {
        prop: Object // 控制loading的显示和隐藏
    }
}
</script>

<style scoped lang="scss">
    .loading {
        width: 100%;
        height: 100%;
        position: fixed;
        left: 0;
        top: 0;
        background-color: rgba($color: #000000, $alpha: 0);
        display: flex;
        justify-content: center;
        align-items: center;
        div {
            width: 250px;
            height: 250px;
            line-height: 210px;
            color: #fff;
            background-color: rgba($color: #000000, $alpha: .8);
            border-radius: 10px;
            font-size: 28px;
            padding: 20px;
            text-align: center;
            font-weight: bold;
        }
    }
</style>